package com.itheima.ClassTest;

import java.util.Scanner;

public class test5 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入:");
        String s = sc.nextLine();
        for (int i = 0; i <s.length(); i++) {
            char c = s.charAt(i);//获取字符串中的每个字符
            System.out.println(c);
        }
        System.out.println("再输入:");
        String s1 = sc.nextLine();
        char[] arr=s1.toCharArray();//将字符串拆分为字符数组
        for (int i = 0; i <arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
}
